home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Weubblers handler.adf / examples / msdos.h < prev    next >
C/C++ Source or Header  |  1988-12-16  |  1KB  |  62 lines

  1. struct MsFileLock
  2.  {
  3.  BPTR fl_Link;
  4.  LONG fl_Key;
  5.  LONG fl_Access;
  6.  struct MsgPort *fl_Task;
  7.  BPTR fl_Volume;
  8.  LONG MagicNum;
  9.  LONG FirstDirBlock;
  10.  LONG DirBlock;
  11.  LONG DirPos;
  12.  LONG FirstBlock;
  13.  };
  14.  
  15. struct MsDosFile
  16.  {
  17.  LONG Used;
  18.  LONG MagicNum;
  19.  LONG FirstCluster;
  20.  LONG BufferPosition;
  21.  LONG Position;
  22.  LONG FileLength;
  23.  LONG ClusterPos;
  24.  LONG BufferDirty;
  25.  LONG LengthDirty;
  26.  LONG LastCluster;
  27.  LONG DirBlk;
  28.  LONG DirPos;
  29.  unsigned char Buffer[2048];
  30.  };
  31.  
  32. struct DOSDIR
  33.  {
  34.  unsigned char FileName[8];
  35.  unsigned char Extension[3];
  36.  unsigned char Attribute;
  37.  unsigned char Padding[10];
  38.  short Time;
  39.  short Date;
  40.  short FirstCluster;
  41.  long FileLength;
  42.  };
  43.  
  44. #undef BADDR
  45. #define BADDR(x) ((APTR) ((x)<<2))
  46. #define AADDR(x) ((BPTR) ((x)>>2))
  47. #define CSTR(x) (((char *) BADDR(x))+1)
  48. #define ACTION_FIND_INPUT  1005
  49. #define ACTION_FIND_OUTPUT 1006
  50. #define ACTION_END           1007
  51. #define ACTION_SEEK           1008
  52. #define DOS_TRUE           -1
  53. #define DOS_FALSE           0
  54.  
  55. #define MSDOSTYPE(x) ((x==TypeStandardAddress)||(x==TypeStandardData))
  56. #define AMIGATYPE(x) (x==TypeAmigaDos)
  57.  
  58. #define FIRSTCLUSTER 26
  59.  
  60. #define MAXLOCKS 20
  61. #define MAXFILES 5
  62.